<template>
    <div class="process">
        <h3>{{process.title}}</h3>
        <ul>
            <li v-for="(item,index) in process.content">
                <h4>{{index+1}}.{{item.name}}</h4>
                <p>{{item.description}}</p>
            </li>
        </ul>
    </div>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
    computed: {
        ...mapGetters([
            'process'
        ])
    },
    created() {
        this.$store.dispatch('getProcess')
    },
    watch: {
        $route() {
            this.$store.dispatch('getProcess').then(() => {
                setTimeout(() => {
                    if (this.$route.params.processCategory == 1) {
                        this.$store.dispatch('getTitle', '海外医疗咨询与服务');
                    } else if (this.$route.params.processCategory == 2) {
                        this.$store.dispatch('getTitle', '海外专家远程会诊服务');
                    } else if (this.$route.params.processCategory == 3) {
                        this.$store.dispatch('getTitle', '其他服务');
                    }
                },100)
            })
        }
    },
    data() {
        return {

        }
    }
}
</script>

<style lang="less">
.process {
    h3 {
        color: #1169b8;
        font-size: 16px;
    }
    ul li {
        line-height: 1.8;
        h4 {
            margin: 0;
            font-weight: normal;
        }
        p {
            margin: 0;
        }
    }
}
</style>